package com.mlethe.android.demo.banner.adapter;

import android.util.Log;

import com.mlethe.android.demo.R;
import com.mlethe.android.demo.banner.loader.ImageLoader;
import com.mlethe.library.widget.banner.BannerAdapter;
import com.mlethe.library.widget.banner.BannerView;

import java.util.List;

public class BannerImgAdapter extends BannerAdapter<String> {
    public BannerImgAdapter(List<String> list) {
        super(list);
    }

    @Override
    public int getLayoutId(String item, int position) {
        return R.layout.item_banner_image;
    }

    @Override
    public void convert(BannerView.ViewHolder holder, String item, int position) {
        holder.setImageByUrl(R.id.item_banner_image_view, new ImageLoader(item));
    }

    @Override
    protected void onCurrentItem(String item, int position) {
        Log.e("TAG", "onCurrentItem: " + position);
    }
}
